﻿@using SmartStore.Web.Models.Profile;
@using SmartStore.Web.Framework.UI;
@model ProfileIndexModel
@{    
    Layout = "_Layout";
    Html.AddTitleParts(T("PageTitle.Profile").Text);
}

<div class="page profile-page">
    <div class="page-title">
        <h1 class="h2">@Model.ProfileTitle</h1>
    </div>
    <div class="page-body">
        @Html.SmartStore().TabStrip().Name("profile-tabs").HtmlAttributes(new { @class = "profile-tabs" }).SmartTabSelection(false).Style(TabsStyle.Material).Responsive(true, "<md").Items(x =>
        {
            x.Add().Text(T("Profile.PersonalInfo").Text)
                .Selected(!Model.PagingPosts)
                .Content(Html.Action("info", new { id = Model.Id }).ToString());

            if (Model.ForumsEnabled)
            {
                x.Add().Text(T("Profile.LatestPosts").Text)
                    .Selected(Model.PagingPosts)
                    .Content(Html.Action("posts", new { id = Model.Id, page = Model.PostsPage }).ToString());
            }
        }).TabContentHeaderContent(TabContentHeader()).Fade(false)
    </div>
</div>

@helper TabContentHeader()
{
	<a href="javascript:void()" class="btn btn-success btn-no-border btn-icon offcanvas-closer rounded-0" title="@T("Common.Close")">
		<i class="fa fa-2x fa-lg fa-angle-left"></i>
	</a>
}
